//
//  TicketCollectionViewCell.m
//  markmap
//
//  Created by 甘世清 on 2024/7/19.
//

#import "TicketCollectionViewCell.h"

@implementation TicketCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.layer.masksToBounds = YES;
        [self SQ_UIViewForSelfView];
    }
    return self;
}
/// 添加ui
-(void)SQ_UIViewForSelfView
{
    self.contentView.layer.cornerRadius = 10;
    self.contentView.clipsToBounds = YES;
    self.contentView.layer.masksToBounds = YES;
    self.bgImage = [[UIImageView alloc]init];
    self.bgImage.layer.cornerRadius = 0;
    self.bgImage.clipsToBounds = YES;
    self.bgImage.layer.masksToBounds = YES;
    self.bgImage.contentMode = UIViewContentModeScaleAspectFill;
    [self.contentView addSubview:self.bgImage];
    [self.bgImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView);
    }];
    [self.contentView addSubview:self.juliLabel];
    [self.juliLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView).offset(12);
            make.right.equalTo(self.contentView.mas_right).offset(-12);
            make.width.mas_equalTo(60);
            make.height.mas_equalTo(26);
    }];
    
}
- (SQCustomButton *)juliLabel{
    if (!_juliLabel) {
        _juliLabel = [[SQCustomButton alloc]initType:SQCustomButtonLeftImageType imageSize:CGSizeMake(12, 16) midmargin:4];
        _juliLabel.image = SQGetImage(@"白色定位");
        _juliLabel.SQBackimageView.image = SQGetImage(@"julibg");
        _juliLabel.font = FONT_MEDIUM(10);
        _juliLabel.textColor = UIColor.whiteColor;
    }
    return _juliLabel;
}
@end
